#ifndef GLOBAL_H
#define GLOBAL_H

#include <QRect>
#include <QHash>
#include <QColor>

#define KYLINSCREENCAP "org.ukui.screencap"
#define UKUI_THEME_GSETTING_PATH "org.ukui.style"
#define GSETTINGS_USD_MEDIA_KEYS_SCHEMA     "org.ukui.SettingsDaemon.plugins.media-keys"
// 全局 qHash 函数声明
uint qHash(const QRect &key, uint seed = 0);

namespace Global {
extern QString name;
extern QString nameOutput;
extern QString version;
extern int showclickCounter;

extern bool isRecordKey;
extern bool isShowCursor;
extern bool isShowCursorPath;
extern bool isShowCursorClick;
extern bool isOpenSysSound;
extern bool isOpenMic;

extern bool recordStatus;   //是否正在录制
extern QList<QString> listShortcut;

extern bool isWayland;     //wayland环境（摄像头在wayland下需要纯wayland启动）

}

enum class SaveFormat : int {
    MP4 = 0,
    MKV = 1,
    AVI = 2,
    MOV = 3,
    WEBM = 4,
    GIF = 5
};

enum class SaveResolution : int {
    STANDARD_QUALITY = 0,               //标清
    HIGHT_QUALITY = 1,                  //高清
    SUPER_OR_ORIGINAL_QUALITY  = 2      //超清/原画质
};

enum class SaveFrameRate : int {
    FPS_15 = 0,
    FPS_25 = 1,
    FPS_30 = 2,
    FPS_50 = 3,
    FPS_60 = 4
};

enum class SaveAction : int {
    ONLY_SAVE = 0,                      //仅保存-无
    OPEN_FILE = 1,                      //保存完成后打开文件-自动播放
    OPEN_FLODER = 2                     //保存完成后打开文件夹-打开文件位置
};
extern SaveAction g_saveAction;

enum class ShortcutRec : int {
    Invoke = 0,
    Start = 1,
    Pause = 2,
    Custom = 3,
    Full = 4,
    Win = 5,
    OpenMic = 6
};

static const QSize TOOL_SIZE = QSize(538, 88);                                       //工具栏尺寸
//static const QSize TOOL_BUTTON_ICON = QSize(36, 36);                                 //工具栏按钮尺寸
static const QSize TOOL_BUTTON_ICON = QSize(24, 24);                                 //工具栏按钮尺寸
//static const QSize TOOL_BUTTON = QSize(75, 75);                                      //工具栏按钮尺寸
static const QSize TOOL_BUTTON = QSize(36, 36);                                      //工具栏按钮尺寸
static const QSize TOOL_BUTTON_Nav = QSize(14, 20);                                      //工具栏按钮尺寸
static const QSize TOOL_Lable_Nav = QSize(62, 21);                                      //label尺寸
static const QSize TOOL_Lable_Nav1 = QSize(45, 21);                                      //label尺寸
static const QSize TOOL_Lable_Nav2 = QSize(40, 21);                                      //label尺寸
static const QColor TOOL_COLOR = QColor(0, 0, 0, 80);      //工具栏阴影颜色(54,54,54)
static const int BLUR_RADIUS = 10;                         //工具栏模糊度
static const double DEFAULT_FONT_SIZE = 11; //字体默认字号
static const int BUTTON_LABEL_SPACING = 15; //按钮和lable的距离
static const int TOOL_BUTTON_WIDTH = 76; //
static const int TOOL_MENU_WIDTH = 120; //
//摄像头
static const QSize CAMERA_MIN_SIZE = QSize(200,142);
static const QSize CAMERA_MAX_SIZE = QSize(655,450);
static const QSize CAMERA_DEFAULT_SIZE = QSize(327,225);
static const int  CAMERA_TO_WINDOW_DISTANCE = 24;
static const int  CAMERA_TO_PANEL_DISTANCE = 48;
static const int CAMERA_RADIUS = 8.57;
//static const QString NOCAMERA_WIN_BACKGROUND = "rgba(39, 39, 39, 0.85)";
static const QSize CAMERA_BUTTON_SIZE = QSize(24,24);
static const QSize CAMERA_BUTTON_ICON_SIZE = QSize(16,16);
static const int CAMERA_BUTTON_RADIUS = 12;
#endif // GLOBAL_H
